package cn.bugstack.types.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum GroupBuyOrderEnumVO {
    /** 状态（0-拼单中、1-完成、2-失败）
     *  private GroupBuyOrderEnumVO status;*/

    PROGRESS(0, "拼单中"),
    COMPLETE(1, "完成"),
    FAIL(2, "失败"),
    ;

    private Integer code;
    private String info;

    public static GroupBuyOrderEnumVO valueof(Integer code) {
        switch (code) {
            case 0: return PROGRESS;
            case 1: return COMPLETE;
            case 2: return FAIL;
        }
        throw new RuntimeException("error! GroupBuyOrderEnumVO valueof(Integer "+ code +"), code("+code+") not exist!");
    }
}
